package com.ruoyi.project.system.commodity.servuce;

import com.ruoyi.project.system.commodity.domain.GoodsInfo;
import com.ruoyi.project.system.commodity.mapper.GoodsInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsInfoServiceImp implements GoodsInfoService{
    @Autowired
    GoodsInfoMapper goodsInfoMapper;


    @Override
    public int insertGoodsInfo(GoodsInfo goodsInfo) {
        return goodsInfoMapper.insertGoodsInfo(goodsInfo);
    }

    @Override
    public List<GoodsInfo> querySpu(int start,int pageSize) {
        return goodsInfoMapper.querySpu(start,pageSize);
    }

    @Override
    public List<String> queryPath(String path) {
        return goodsInfoMapper.queryPath(path);
    }


    @Override
    public void offShelfGoodsById(int id) {
        goodsInfoMapper.offShelfGoodsById(id);
    }

    @Override
    public void putShelfGoods(int id) {
        goodsInfoMapper.putShelfGoods(id);
    }

    @Override
    public void deleteSpu(int id) {
        goodsInfoMapper.deleteSpu(id);
    }

    @Override
    public void updateGoodsInfo(GoodsInfo goodsInfo) {
        goodsInfoMapper.updateGoodsInfo(goodsInfo);
    }

    @Override
    public int querySpuCount() {
        return goodsInfoMapper.querySpuCount();
    }

    @Override
    public List<GoodsInfo> querySpuByName(GoodsInfo goodsInfo) {
        return goodsInfoMapper.querySpuByName(goodsInfo);
    }
}
